<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>简历中心</title>
    <link rel="icon" href="/hire/imgs/favicon.ico" type="image/x-icon"/>
<%--    <link rel="stylesheet" href="/hire/plugins/bootstrap/css/bootstrap.min.css">--%>
    <link rel="stylesheet" href="/hire/css/common/nav_left.css">
    <link rel="stylesheet" href="/hire/css/user/center/resume_center.css">


</head>

<body>
<%@include file="../../common/mynav.jsp" %>
<div class="middler">
    <div class="inner">
        <div class="left">
            <div class="menu-list">
                <ul class="menu">
                    <li><a href="/hire/user/employee_info">个人中心</a></li>
                    <li class="active"><a href="/hire/user/resume_center">简历中心</a></li>
                    <li><a href="/hire/user/resume_view">谁看过我</a></li>
                    <li><a href="/hire/user/mydelivery">我的投递</a></li>
                    <li><a href="/hire/user/mycollection">我的收藏</a></li>
                    <li><a href="/hire/user/myblacklist">我的屏蔽</a></li>
                    <li><a href="/hire/user/account_settings">账号设置</a></li>
                </ul>
            </div>
        </div>

        <div class="right">
            <div class="title">
                <h2>简历中心</h2>
                <a href="/hire/resume/resume_make">新建简历</a>
            </div>
            <br>
            <div class="container-fluid">
                <div class="row">
                    <c:forEach items="${resumeDTOList}" var="resumeDTO">
<%--                        <div class="col-md-12">--%>
                        <div style="width: 917px">
                            <div class="thumbnail">
                                <div class="caption" style="line-height: 35px">
                                    <div class="big">
                                        <div class="le">
                                            <div class="name">
                                                <a href="/hire/resume/resume_preview?resumeId=${resumeDTO.resume.id}">我的简历${resumeDTO.count}</a>
                                            </div>
                                            <div class="time" style="margin-top:-10px">
                                                <span>更新时间:</span>
                                                <span><fmt:formatDate value="${resumeDTO.resume.updateTime}"
                                                                      pattern="yyyy-MM-dd"/></span>
                                            </div>
                                        </div>
                                        <div class="op">
                                            <span><a href="/hire/resume/resume_make?resumeId=${resumeDTO.resume.id}"><button type="button" style="cursor:pointer;margin-top:20px;margin-right: 5px;color: white">编辑</button></a></span>
                                            <span><button type="button" style="cursor:pointer;margin-top:20px;margin-right: 5px;color: white" onclick="deleteResume(${resumeDTO.resume.id})">删除</button></span>
                                        </div>
                                    </div>
                                    <div class="big2" style="padding-bottom: 5px">
                                        &nbsp;&nbsp;
                                        <span class="state1">${resumeDTO.privacy1}</span>
                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<%--                                        <span class="state2"><a href="/hire/job/recruitment/recruitment"> <button style="border: 0px;background-color: white;cursor:pointer">快速投递</button></a></span>--%>
                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                        <span class="state2" id="privacy"><button style="border: 0px;background-color: white;cursor:pointer" onclick="privacyChange(${resumeDTO.resume.id})">更改状态</button></span>
                                    </div>
                                    <br>
                                </div>
                            </div>
                        </div>
                    </c:forEach>
                </div>
            </div>
            <div class="content">
                <ul>
                    <li>
                        <div class="resume">
                        </div>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>
<script>
    function deleteResume(id) {
            $.post('/hire/user/delete/resume',{resumeId:id},function (res) {
                if (res.code == '200') {
                    // layer.msg("删除成功")
                    location.reload();
                } else {
                    layer.msg("删除失败")
            }
        })
    }

    <%--window.onload=function(){--%>
    <%--    if (1==${resumeDTO.resume.privacy}){--%>
    <%--        $("#privacy").text("隐藏简历");--%>
    <%--    }else {--%>
    <%--        $("#privacy").text("公开简历");--%>
    <%--    }--%>
    <%--}--%>

    function privacyChange(id) {
        $.post("/hire/user/update/privacy",{resumeId:id},function (res) {
            if (res.code=='200') {
                location.reload();
                layer.msg("更新成功")
            }
            else
                layer.msg("更新失败")
        })
    }
</script>
<%@include file="../../common/myfooter.jsp" %>
<script src="/hire/plugins/jquery/jquery.min.js"></script>
<script src="/hire/plugins/bootstrap/js/bootstrap.min.js"></script>
<%--F--%>
</body>

</html>